import { ApiCall } from "tsrpc";
import { ReqTest_createEnemy, ResTest_createEnemy } from "../../../shared/master/word/PtlTest_createEnemy";
import { player } from "../../../model/fight/body/player";
import master from "../..";
/**
 * 在玩家当前位置创建一个测试怪物
 * @param call 
 */
export default async function (call: ApiCall<ReqTest_createEnemy, ResTest_createEnemy>) {
    let user = call.req._player as player;
    let _cell = user.getPosition();
    _cell.createEnemy(1);
    _cell.createEnemy(1);
    _cell.createEnemy(1);
    _cell.createEnemy(1);
    master.s_wss.callApi('word/Position', {
        _platform: call.req._platform,
        _onlyid: call.req._onlyid,
        _fromid: call.req._fromid
    })
    call.succ({})
}